<?php
$root = realpath($_SERVER["DOCUMENT_ROOT"]) . "/SmartTuition/SmartTuition.Model"; 
// including base class, EntityWithID
require_once("$root/Models/Base/EntityWithID.php");

class User extends EntityWithID
{
    private $firstName;
    private $lastName;
    private $phone;
    private $age;
    private $email;
    private $password;
    private $roleId;

    function __construct($id, $name, $lastName, $phone, $age, $email, $password, $role_id) {
        parent::__construct($id);
        $this->firstName = $name;
        $this->lastName = $lastName;
        $this->phone = $phone;
        $this->age = $age;
        $this->email = $email;
        $this->password = $password;
        $this->roleId = $role_id;
        $this->columns = "FirstName, LastName, Phone, Age, Email, Password, RoleID";
    }

    public function getName() {
        return $this->firstName;
    }

    public function getSurname() {
        return $this->lastName;
    }

    public function  getAge() {
        return $this->age;
    }

    public  function getPhone() {
        return $this->phone;
    }

    public function getEmail() {
        return $this->email;
    }

    public function getPassword() {
        return $this->password;
    }

    public  function  getRoleId() {
        return $this->roleId;
    }

    public function getValues() {
        $str = "'" . $this->firstName .  "', '" . $this->lastName .  "','" . $this->phone .  "'," . $this->age .  ",'" . $this->email .  "','" . $this->password .  "'," . $this->roleId;
        return $str;
    }
}